package com.atguigu.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 启动springboot的主项目程序
 */
@SpringBootApplication
public class MainApplication {
    public static void main(String[] args) {
//        ConfigurableApplicationContext run = SpringApplication.run(MainApplication.class, args);
            //局部变量类型的自动推断
        var ioc =SpringApplication.run(MainApplication.class,args);
        for (String beanDefinitionName : ioc.getBeanDefinitionNames()) {
            System.out.println("beanDefinitionName = " + beanDefinitionName);
        }


    }
}
